package demo1;

public class Main {
    public static void main(String[] args) throws InterruptedException {
        MyQueue myQueue=new MyQueue(5);
        myQueue.put(1);
        myQueue.put(2);
        myQueue.put(3);
        myQueue.put(4);
        myQueue.put(5);
        myQueue.put(6);
        System.out.println(myQueue.take());
        System.out.println(myQueue.take());
        System.out.println(myQueue.take());
        System.out.println(myQueue.take());
        System.out.println(myQueue.take());
        System.out.println(myQueue.take());
    }
}
